﻿Public Class RateApp
    Private loader As FuncClasses.IDatabase
    Public Sub New(window As Window1)

        ' Dieser Aufruf ist für den Designer erforderlich.
        InitializeComponent()
        loader = window.Database
        ' Fügen Sie Initialisierungen nach dem InitializeComponent()-Aufruf hinzu.
        Dim showit As Boolean
        Try
            showit = CBool(loader.GetSettingByKey("showchristmasrate"))
        Catch ex As Exception
            showit = False
        End Try
        If FuncClasses.Statistics.CompanyStats.IsDateBetween(New Date(Date.Today.Year, 12, 17), New Date(Date.Today.Year, 12, 26), Date.Today) AndAlso showit Then
            window.AddNewWelcomeInfo(Me)
            window.AddNewLicense("Christmastree-Icon", "CC Attribution-Noncommercial-No Derivate 3.0", "You can find the icon under http://www.iconarchive.com/show/christmas-xp-icons-by-deleket/Christmas-Tree-icon.html. It was created by deleket (http://www.deleket.com/)")
        Else
            '#If DEBUG Then
            'window.AddNewWelcomeInfo(Me)
            'window.AddNewLicense("Christmastree-Icon", "CC Attribution-Noncommercial-No Derivate 3.0", "You can find the icon under http://www.iconarchive.com/show/christmas-xp-icons-by-deleket/Christmas-Tree-icon.html. It was created by deleket (http://www.deleket.com/)")
            '#End If
        End If
    End Sub

    Private Sub TextBlock1_MouseUp(sender As System.Object, e As System.Windows.Input.MouseButtonEventArgs) Handles TextBlock1.MouseUp
        Process.Start("http://www.heise.de/download/biller-1188883.html")
    End Sub

    Private Sub TextBlock2_MouseUp(sender As System.Object, e As System.Windows.Input.MouseButtonEventArgs) Handles TextBlock2.MouseUp
        Process.Start("http://www.freeware.de/download/biller_59807.html")
    End Sub

    Private Sub CheckBox1_Checked(sender As System.Object, e As System.Windows.RoutedEventArgs) Handles CheckBox1.Checked
        loader.SetSettingByKey("showchristmasrate", "False")
    End Sub

    Private Sub CheckBox1_Unchecked(sender As System.Object, e As System.Windows.RoutedEventArgs) Handles CheckBox1.Unchecked
        loader.SetSettingByKey("showchristmasrate", "True")
    End Sub
End Class
